package com.kpu.protocol;

import java.io.Serializable;

public class MemberInfo implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5362597956326720557L;
	private String UserName;
	private String ID;
	private String Password;
	private String Address;
	private String Mail;
	private String PhoneNumber;

	public MemberInfo() {
		UserName = "";
		ID = "";
		Password = "";
		Address = "";
		Mail = "";
		PhoneNumber = "";
	}

	public boolean setUserName(String username) {
		this.UserName = username;
		return false;
	}

	public boolean setID(String id) {
		boolean checkID = true;
		char tmpChar;

		if (id.length() >= 6 && id.length() <= 20) {
			for (int i = 0; i < id.length(); i++) {
				tmpChar = id.charAt(i);
				if (tmpChar < 47 || tmpChar > 122)
					checkID = false;
			}
		} else
			checkID = false;

		if (checkID == true) {
			this.ID = id;
			return true;
		} else {
			return false;
		}
	}

	public boolean setPassword(String password) {
		this.Password = password;
		return false;
	}

	public boolean setAddress(String address) {
		this.Address = address;
		return false;
	}

	public boolean setMail(String mail) {
		this.Mail = mail;
		return false;
	}

	public boolean setPhoneNumber(String phonenumber) {
		this.PhoneNumber = phonenumber;
		return false;
	}

	public String getUserName() {
		return this.UserName;
	}

	public String getID() {
		return this.ID;
	}

	public String getPassword() {
		return this.Password;
	}

	public String getAddress() {
		return this.Address;
	}

	public String getMail() {
		return this.Mail;
	}

	public String getPhoneNumber() {
		return this.PhoneNumber;
	}
}
